package helperfunctions

import "golang.org/x/crypto/bcrypt"

func HashPassword(password string) (string, error) {
  bytes, err := bcrypt.GenerateFromPassword([]byte(password), 14)
	return string(bytes), err
}

func DecryptPassword(hashedPassword string, password string) error {
  err := bcrypt.CompareHashAndPassword([]byte(hashedPassword), []byte(password))
  return err
}
